package com.qingmeng.apiclientsdk.service.impl;

import com.qingmeng.apiclientsdk.client.ApiClient;
import com.qingmeng.apiclientsdk.exception.ApiException;
import com.qingmeng.apiclientsdk.model.Request.HistoryDayRequest;
import com.qingmeng.apiclientsdk.model.Request.NameRequest;
import com.qingmeng.apiclientsdk.model.Response.HistoryDayResponse;
import com.qingmeng.apiclientsdk.model.Response.NameResponse;
import com.qingmeng.apiclientsdk.service.ApiService;

/**
 * @Author: WPF
 * @DateTime: 2025/01/02 17:57
 * @Version: 1.0
 * @Description:
 */
public class ApiServiceImpl extends BaseServiceImpl implements ApiService {

    @Override
    public NameResponse getNameByJson(NameRequest nameRequest) throws ApiException {
        return request(nameRequest);
    }

    @Override
    public NameResponse getNameByJson(NameRequest nameRequest, ApiClient apiClient) throws ApiException {
        return request(apiClient, nameRequest);
    }

    @Override
    public HistoryDayResponse getHistoryDayByJson(HistoryDayRequest historyDayRequest) throws ApiException {
        return request(historyDayRequest);
    }

    @Override
    public HistoryDayResponse getHistoryDayByJson(HistoryDayRequest historyDayRequest, ApiClient apiClient) throws ApiException {
        return request(apiClient, historyDayRequest);
    }
}
